{extend name="base" /}
    {block name="css"}
    <link rel="stylesheet" href="__PUBLIC__/wangEditor/css/wangEditor.min.css">
    <style type="text/css">
.wangEditor-menu-container .menu-item a {padding: 12px 0;}
.wangEditor-menu-container .menu-item {height: 37px;width: 37px;}
.wangEditor-menu-container .menu-group {padding: 0;}
.wangEditor-container {border: 1px solid #e6e6e6;}
</style>
    {/block}
{block name="body"}

    <!--tab标签-->
    <div class="layui-tab-brief">

        <div class="layui-tab-content">
            <div class="layui-tab-item layui-show">
                <form class="layui-form form-container" data-url="{:url('admin/forum/update')}"  localtion-url="{:url('forum/index')}">
    <div class="layui-form-item" style="width: 300px;">
    <label class="layui-form-label">所在板块</label>
    <div class="layui-input-block">
      <select name="tid">
	  {volist name="tptcs" id="vo"}
      <option {if condition="$slide_category['tid'] eq $vo['id']"}selected="selected"{/if} value="{$vo.id}">{neq name="vo.level" value="1"}|{php}for($i=1;$i<$vo['level'];$i++){echo ' --';}{/php}{/neq}{$vo.name}</option>
      {/volist}
	  </select>
    </div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">标题</label>
    <div class="layui-input-block">
      <input type="text" name="title" value="{$slide_category.title}" required lay-verify="required" placeholder="必填内容" autocomplete="off" class="layui-input">
    </div>
  </div>

  <div class="layui-form-item layui-form-text">
    <label class="layui-form-label">内容</label>
    <div class="layui-input-block">
      <textarea id="textarea" name="content" style="height:300px;width: 100%;">
      {$slide_category.content}</textarea>
    </div>
  </div>
                  
                           <input type="hidden" name="id" value="{$slide_category.id}">
                         <div class="btable-paged" >
				<div class="layui-main">
                    <div class="formbtngroup">
<button class="layui-btn layui-btn-sm" lay-submit="" lay-filter="formadd">更新</button>
<button onclick="history.go(-1);" class="layui-btn layui-btn-primary layui-btn-sm">返回</button>
</div>
</div>
        </div>
                </form>
            </div>
        </div>
    </div>
{/block}
{block name="js"}
<script type="text/javascript" src="__PUBLIC__/js/formadd.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/wangEditor/js/wangEditor.min.js"></script>
<script type="text/javascript">
    var editor = new wangEditor('textarea');
	editor.config.uploadImgUrl = '{:url("system/doUploadPic")}';
	editor.config.uploadImgFileName = 'FileName';
	editor.config.menus = $.map(wangEditor.config.menus, function(item, key) {
		if (item === 'eraser') {
		return null;
		}
		if (item === 'video') {
		return null;
		}
		if (item === 'location') {
		return null;
		}
		return item;
		});
	editor.config.pasteText = false;
    editor.create();
</script>
{/block}